from __clrclasses__.Microsoft.Win32.SafeHandles import SafePipeHandle as _n_0_t_0
from __clrclasses__.System import IDisposable as _n_1_t_0
from __clrclasses__.System import IAsyncResult as _n_1_t_1
from __clrclasses__.System import AsyncCallback as _n_1_t_2
from __clrclasses__.System import Enum as _n_1_t_3
from __clrclasses__.System import IComparable as _n_1_t_4
from __clrclasses__.System import IFormattable as _n_1_t_5
from __clrclasses__.System import IConvertible as _n_1_t_6
from __clrclasses__.System import MulticastDelegate as _n_1_t_7
from __clrclasses__.System import ICloneable as _n_1_t_8
from __clrclasses__.System import IntPtr as _n_1_t_9
from __clrclasses__.System.IO import HandleInheritability as _n_2_t_0
from __clrclasses__.System.IO import Stream as _n_2_t_1
from __clrclasses__.System.Runtime.Serialization import ISerializable as _n_3_t_0
from __clrclasses__.System.Security.AccessControl import AccessRule as _n_4_t_0
from __clrclasses__.System.Security.AccessControl import AccessControlType as _n_4_t_1
from __clrclasses__.System.Security.AccessControl import AuditRule as _n_4_t_2
from __clrclasses__.System.Security.AccessControl import AuditFlags as _n_4_t_3
from __clrclasses__.System.Security.AccessControl import NativeObjectSecurity as _n_4_t_4
from __clrclasses__.System.Security.Principal import TokenImpersonationLevel as _n_5_t_0
from __clrclasses__.System.Security.Principal import IdentityReference as _n_5_t_1
from __clrclasses__.System.Threading import CancellationToken as _n_6_t_0
from __clrclasses__.System.Threading.Tasks import Task as _n_7_t_0
import typing
class AnonymousPipeClientStream(PipeStream, _n_1_t_0):
    def __init__(self, direction: PipeDirection, safePipeHandle: _n_0_t_0) -> AnonymousPipeClientStream:...
    def __init__(self, direction: PipeDirection, pipeHandleAsString: str) -> AnonymousPipeClientStream:...
    def __init__(self, pipeHandleAsString: str) -> AnonymousPipeClientStream:...
class AnonymousPipeServerStream(PipeStream, _n_1_t_0):
    @property
    def ClientSafePipeHandle(self) -> _n_0_t_0:"""ClientSafePipeHandle { get; } -> SafePipeHandle"""
    def __init__(self, direction: PipeDirection, serverSafePipeHandle: _n_0_t_0, clientSafePipeHandle: _n_0_t_0) -> AnonymousPipeServerStream:...
    def __init__(self, direction: PipeDirection, inheritability: _n_2_t_0, bufferSize: int, pipeSecurity: PipeSecurity) -> AnonymousPipeServerStream:...
    def __init__(self, direction: PipeDirection, inheritability: _n_2_t_0, bufferSize: int) -> AnonymousPipeServerStream:...
    def __init__(self, direction: PipeDirection, inheritability: _n_2_t_0) -> AnonymousPipeServerStream:...
    def __init__(self, direction: PipeDirection) -> AnonymousPipeServerStream:...
    def __init__(self) -> AnonymousPipeServerStream:...
    def DisposeLocalCopyOfClientHandle(self):...
    def GetClientHandleAsString(self) -> str:...
class NamedPipeClientStream(PipeStream, _n_1_t_0):
    @property
    def NumberOfServerInstances(self) -> int:"""NumberOfServerInstances { get; } -> int"""
    def __init__(self, direction: PipeDirection, isAsync: bool, isConnected: bool, safePipeHandle: _n_0_t_0) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str, desiredAccessRights: PipeAccessRights, options: PipeOptions, impersonationLevel: _n_5_t_0, inheritability: _n_2_t_0) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str, direction: PipeDirection, options: PipeOptions, impersonationLevel: _n_5_t_0, inheritability: _n_2_t_0) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str, direction: PipeDirection, options: PipeOptions, impersonationLevel: _n_5_t_0) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str, direction: PipeDirection, options: PipeOptions) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str, direction: PipeDirection) -> NamedPipeClientStream:...
    def __init__(self, serverName: str, pipeName: str) -> NamedPipeClientStream:...
    def __init__(self, pipeName: str) -> NamedPipeClientStream:...
    def Connect(self, timeout: int):...
    def Connect(self):...
    def ConnectAsync(self, timeout: int, cancellationToken: _n_6_t_0) -> _n_7_t_0:...
    def ConnectAsync(self, cancellationToken: _n_6_t_0) -> _n_7_t_0:...
    def ConnectAsync(self, timeout: int) -> _n_7_t_0:...
    def ConnectAsync(self) -> _n_7_t_0:...
class NamedPipeServerStream(PipeStream, _n_1_t_0):
    MaxAllowedServerInstances: int
    def __init__(self, direction: PipeDirection, isAsync: bool, isConnected: bool, safePipeHandle: _n_0_t_0) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode, options: PipeOptions, inBufferSize: int, outBufferSize: int, pipeSecurity: PipeSecurity, inheritability: _n_2_t_0, additionalAccessRights: PipeAccessRights) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode, options: PipeOptions, inBufferSize: int, outBufferSize: int, pipeSecurity: PipeSecurity, inheritability: _n_2_t_0) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode, options: PipeOptions, inBufferSize: int, outBufferSize: int, pipeSecurity: PipeSecurity) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode, options: PipeOptions, inBufferSize: int, outBufferSize: int) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode, options: PipeOptions) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int, transmissionMode: PipeTransmissionMode) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection, maxNumberOfServerInstances: int) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str, direction: PipeDirection) -> NamedPipeServerStream:...
    def __init__(self, pipeName: str) -> NamedPipeServerStream:...
    def BeginWaitForConnection(self, callback: _n_1_t_2, state: object) -> _n_1_t_1:...
    def Disconnect(self):...
    def EndWaitForConnection(self, asyncResult: _n_1_t_1):...
    def GetImpersonationUserName(self) -> str:...
    def RunAsClient(self, impersonationWorker: PipeStreamImpersonationWorker):...
    def WaitForConnection(self):...
    def WaitForConnectionAsync(self) -> _n_7_t_0:...
    def WaitForConnectionAsync(self, cancellationToken: _n_6_t_0) -> _n_7_t_0:...
class PipeAccessRights(_n_1_t_3, _n_1_t_4, _n_1_t_5, _n_1_t_6):
    AccessSystemSecurity: int
    ChangePermissions: int
    CreateNewInstance: int
    Delete: int
    FullControl: int
    Read: int
    ReadAttributes: int
    ReadData: int
    ReadExtendedAttributes: int
    ReadPermissions: int
    ReadWrite: int
    Synchronize: int
    TakeOwnership: int
    value__: int
    Write: int
    WriteAttributes: int
    WriteData: int
    WriteExtendedAttributes: int
class PipeAccessRule(_n_4_t_0):
    @property
    def PipeAccessRights(self) -> PipeAccessRights:"""PipeAccessRights { get; } -> PipeAccessRights"""
    def __init__(self, identity: _n_5_t_1, rights: PipeAccessRights, type: _n_4_t_1) -> PipeAccessRule:...
    def __init__(self, identity: str, rights: PipeAccessRights, type: _n_4_t_1) -> PipeAccessRule:...
class PipeAuditRule(_n_4_t_2):
    @property
    def PipeAccessRights(self) -> PipeAccessRights:"""PipeAccessRights { get; } -> PipeAccessRights"""
    def __init__(self, identity: str, rights: PipeAccessRights, flags: _n_4_t_3) -> PipeAuditRule:...
    def __init__(self, identity: _n_5_t_1, rights: PipeAccessRights, flags: _n_4_t_3) -> PipeAuditRule:...
class PipeDirection(_n_1_t_3, _n_1_t_4, _n_1_t_5, _n_1_t_6):
    In: int
    InOut: int
    Out: int
    value__: int
class PipeOptions(_n_1_t_3, _n_1_t_4, _n_1_t_5, _n_1_t_6):
    Asynchronous: int
    _None: int
    value__: int
    WriteThrough: int
class PipeSecurity(_n_4_t_4):
    def __init__(self) -> PipeSecurity:...
    def AddAccessRule(self, rule: PipeAccessRule):...
    def AddAuditRule(self, rule: PipeAuditRule):...
    def RemoveAccessRule(self, rule: PipeAccessRule) -> bool:...
    def RemoveAccessRuleSpecific(self, rule: PipeAccessRule):...
    def RemoveAuditRule(self, rule: PipeAuditRule) -> bool:...
    def RemoveAuditRuleAll(self, rule: PipeAuditRule):...
    def RemoveAuditRuleSpecific(self, rule: PipeAuditRule):...
    def ResetAccessRule(self, rule: PipeAccessRule):...
    def SetAccessRule(self, rule: PipeAccessRule):...
    def SetAuditRule(self, rule: PipeAuditRule):...
class PipeStream(_n_2_t_1, _n_1_t_0):
    @property
    def InBufferSize(self) -> int:"""InBufferSize { get; } -> int"""
    @property
    def IsAsync(self) -> bool:"""IsAsync { get; } -> bool"""
    @property
    def IsConnected(self) -> bool:"""IsConnected { get; set; } -> bool"""
    @property
    def IsMessageComplete(self) -> bool:"""IsMessageComplete { get; } -> bool"""
    @property
    def OutBufferSize(self) -> int:"""OutBufferSize { get; } -> int"""
    @property
    def ReadMode(self) -> PipeTransmissionMode:"""ReadMode { get; set; } -> PipeTransmissionMode"""
    @property
    def SafePipeHandle(self) -> _n_0_t_0:"""SafePipeHandle { get; } -> SafePipeHandle"""
    @property
    def TransmissionMode(self) -> PipeTransmissionMode:"""TransmissionMode { get; } -> PipeTransmissionMode"""
    def GetAccessControl(self) -> PipeSecurity:...
    def SetAccessControl(self, pipeSecurity: PipeSecurity):...
    def WaitForPipeDrain(self):...
class PipeStreamImpersonationWorker(_n_1_t_7, _n_1_t_8, _n_3_t_0):
    def __init__(self, object: object, method: _n_1_t_9) -> PipeStreamImpersonationWorker:...
    def BeginInvoke(self, callback: _n_1_t_2, object: object) -> _n_1_t_1:...
    def EndInvoke(self, result: _n_1_t_1):...
    def Invoke(self):...
class PipeTransmissionMode(_n_1_t_3, _n_1_t_4, _n_1_t_5, _n_1_t_6):
    Byte: int
    Message: int
    value__: int
